<?php

class Core_Model_Foundation_Collection_Ritu_Industry extends Dcmp_Model_Collection_Strong {

    public function __construct() {
        parent::__construct();
        $this->setItemClass('foundation/ritu_industry');
        $this->from('{t}foundation_ritu_industry', 'a');
    }

    public function filterBy($name, $arg) {
        switch ($name) {
            case 'name':
                return $this->like('a.name', ':name:s')->addParameter('name', "%$arg%");
            case 'ids':
                return $this->contain('a.id', ':id:i')->addParameter('id', $arg);
        }
        return parent::filterBy($name, $arg);
    }
}